home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Macintosh Demo Applications CD
/
Apple-MacintoshDemoApplicationsCD-1.0-1992.iso
/
More Information
/
QuicKeys
/
For Programmers Only.sea
/
C Examples
/
SampleXhdr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-22
|
2KB
|
79 lines
/*
$Workfile: SampleXhdr.c $
$Revision: 1.0 $
QuicKeys sample extension execution routine
custom header for Think C
© 1990 CE Software, Inc. All rights reserved.
For QuicKeys 2 Extension Sample source code you have a royalty-free right
to include object code derived from this Sample source code in programs
that you develop. You also have the right to use, distribute, and license
such programs to third parties without payment of any further license fees
to CE Software, Inc., so long as a copyright notice sufficient to protect
your copyright for your software in the United States or any other country;
is included in the graphic display of your software and on the labels
affixed to the media on which your software is distributed.
WHEN WHO WHAT
Checked in by Marsh Gosnell, Wednesday, September 5, 1990 12:45:39 PM
8/28 mkg created file
•••••
•••••
*/
extern pascal void doExecute();
/* the first function in the file, our custom header */
main() {
asm {
dc.l 0 ; next entry in the queue
dc.l 0 ; extension creator
dc.w 0 ; flags
dc.l 0 ; extension file name
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0 ; SICN to display
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0
dc.l 0 ;our refcon, if we want it
link A6,#0 ; execution starts here
move.w 12(A6),-(A7) ; push selector
move.l 8(A6),A0 ; get address of current key data
lea 0x7B4(A0),A0
move.l A0,-(A7)
pea main ; address of our queue entry
move.w D3,-(A7) ; type of periodic
lea main,A0 ; so you can do RememberA0
jsr doExecute
unlk A6
move.l (SP)+,A0
adda.l #6,SP
jmp (A0)
}
}